package com.nwpu.am.constant;

/**
 * RoleConstant
 *
 * @author Roy
 * @version 1.0
 * {@code @date} 2024/6/6
 */

public class RoleConstant {
    private RoleConstant() {}

    public static final String ADMIN = "admin";
    public static final String STAFF = "staff";
    public static final short ADMIN_CODE = 1;
    public static final short STAFF_CODE = 0;

    public static String getRole(short roleCode) {
        switch (roleCode) {
            case ADMIN_CODE:
                return ADMIN;
            case STAFF_CODE:
                return STAFF;
            default:
                return null;
        }
    }
}
